<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		.box{
			width: 1200px;
			margin: 0 auto;
			background-color: pink;
		}
		.one{
			width: 1200px;
			margin: 0 auto;
			background-color: blue;
		}
		.only{
			width: 200px;
			height: 320px;
			background-color: red;
			margin: 10px;
			float: left;
		}
		h2{
			width: 1200px;
			padding: 10px;
			box-sizing: border-box;
			}
		.clear{
			clear: both;
/*			专门清除浮动带来的影响   隔墙法*/
		}
		.clearFix::after{
			content: "";
			clear: both;
			display: block;
		}

	</style>
</head>
<body>


<!-- 给浮动元素的父级  添加清除浮动的类名   伪元素清除法 -->
<div class="box clearFix">
	<div class="only"></div>
	<div class="only"></div>
	<div class="only"></div>

	
</div>

<div class="one clearFix">
	<div class="only"></div>
	<div class="only"></div>
	<div class="only"></div>

	
</div>



<h2>我是彦男</h2>


</body>
</html>